package com.caigou.enums;

import lombok.Getter;

@Getter
public enum RecycleTypeEnum {

    MANUSCRIPT(1, "gaojiankuchaxun"),//稿件库回收权限

    PICTURE(2, "tupian_quankuchaxun"),//图片库回收权限

    AUDIO(3,"yinpin_quankuchaxun"),//音频库回收权限

    VIDEO(4,"shipin_quankuchaxun")//视频库回收权限
    ;


    private Integer type;

    private String code;

    RecycleTypeEnum(Integer type, String code) {
        this.type = type;
        this.code = code;
    }
    /**
     *
     * 方法描述 根据类型的名称，返回类型的枚举实例。
     *
     */
    public static RecycleTypeEnum getRecycleTypeEnum(int recycleType) {
        for (RecycleTypeEnum type : RecycleTypeEnum.values()) {
            if (type.getType() == recycleType) {
                return type;
            }
        }
        return null;
    }


}
